import {BaseCrudApi} from "~/api/util/BaseService";
import {UrlVO} from "~/api/system/permission/types";
import {reactive} from "vue";
import {WeChatPermission} from "~/api/wechat/permission/types";

export class WeChatPermissionApi extends BaseCrudApi<WeChatPermission> {
    baseUrl: string = "/wechat/permission";

    urlState = reactive<{ data: UrlVO[] }>({
        data: [],
    });

    getAllUrl() {
        this.get<UrlVO[]>("/getAllUrl").then(res => {
            if (res.data) {
                this.urlState.data = res.data;
            }
        });
    }
}
